package com.ysd.qxgl.service;

import java.util.List;

import javax.annotation.Resource;

import com.ysd.qxgl.dao.IRoleUserDao;


import org.springframework.stereotype.Service;

@Service
public class RoleUserServiceImpl implements IRoleUserService {
    @Resource
    private IRoleUserDao roleUserDao;

    @Override
    public void setUserRoles(String user_id, List<String> roleIdList) {
        for(String roleId:roleIdList) {
            roleUserDao.addUserRole(user_id,roleId);
        }
       
    }

    @Override
    public int addUserRole(String user_id, String role_id) {
        return roleUserDao.addUserRole(user_id, role_id);
    }
    
}